import request from '@/utils/request'

// 查询轮播图列表
export function listSlider(query) {
  return request({
    url: '/hotel/slider/list',
    method: 'get',
    params: query
  })
}

// 查询轮播图详细
export function getSlider(id) {
  return request({
    url: '/hotel/slider/' + id,
    method: 'get'
  })
}

// 新增轮播图
export function addSlider(data) {
  return request({
    url: '/hotel/slider',
    method: 'post',
    data: data
  })
}

// 修改轮播图
export function updateSlider(data) {
  return request({
    url: '/hotel/slider',
    method: 'put',
    data: data
  })
}

// 删除轮播图
export function delSlider(id) {
  return request({
    url: '/hotel/slider/' + id,
    method: 'delete'
  })
}
